package level.editor.window;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;

/*
 * Creates the main window upon which all other Panels and Frames will reside.
 * Parent of all the View classes.
 */

public class Window extends JFrame
{
	private JPanel west;
	
	public Window(String title)
	{
		super(title);
		setVisible(false);
		LookAndFeel.initLookAndFeel();
		west = new JPanel();
		west.setLayout(new BoxLayout(west, BoxLayout.Y_AXIS));
		init();
	}

	private void init()
	{
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Change to
														// DO_NOTHING_ON_CLOSE
														// later
		setMinimumSize(new Dimension(1626, 1019));
		setResizable(false);
		add(west, BorderLayout.WEST);
		
		setVisible(true);
	}
	
	public void addWest(JComponent component)
	{
		west.add(component);
	}
}